package com.person.android.utils;

import android.app.ProgressDialog;
import android.content.Context;
import android.widget.Toast;

/**
 * @autor zhaokang.
 * @time on 2015/12/9.
 */
public class ToastUtils {
    public static void showToast(Context context,String content){
        Toast.makeText(context,content,Toast.LENGTH_SHORT).show();
    }

    /**显示加载圈*/
    public static ProgressDialog showProgressDialog(Context context,String content,ProgressDialog prg){
        if (prg == null || !prg.isShowing()){
            prg = ProgressDialog.show(context,"",content,true,false);
        }
        return prg;
    }

    /**消失加载圈*/
    public static void dismissProgressDialog(ProgressDialog prg){
        if (prg != null || prg.isShowing()){
            prg.dismiss();
            prg = null;
        }
    }
}
